from django.urls import path
from . import views

app_name = 'shop'

urlpatterns = [
    path('', views.product_list, name='product_list'),
    path('list/', views.product_list, name='product-list'),
    path('<slug:category_slug>/', views.product_list, name='product_list_by_category'),
    path('<int:id>/<slug:slug>/', views.product_detail, name='product_detail'),
    path('orders/', views.order_list, name='order_list'),
    path('orders/create/', views.order_create, name='order_create'),
    path('orders/<int:order_id>/', views.order_detail, name='order_detail'),
    path('auth/register/', views.UserRegistrationView.as_view(), name='user_register'),
    path('auth/login/', views.UserLoginView.as_view(), name='user_login'),
    path('api/profile/', views.UserProfileView.as_view(), name='user_profile'),
    path('api/address/', views.AddressListView.as_view(), name='address_list'),
    path('api/cart/', views.CartView.as_view(), name='cart'),
    path('api/stock/reserve/', views.StockReservationView.as_view(), name='stock_reserve'),
]